
package combat.protocol.data;

import java.util.Calendar;
import java.util.Date;

import combat.NewID;
import combat.protocol.interfaces.ChatEntryInt;


public class ChatEntry extends NewID.ChatID implements ChatEntryInt {

	private static final long serialVersionUID = 1L;

	private int messageID = 0;
	private String userName = "";
	private Object target = null;
	private Date timestamp = null;
	private String message = ""; 

	public ChatEntry(int messageID, String userName, Object target, String message) {
		this.messageID = messageID;
		this.userName = userName;
		this.target = target;
		this.timestamp = Calendar.getInstance().getTime(); // Current date and time (in milliseconds since 1970)
		this.message = message;
	}

	@Override
	public int getMessageID() {
		return messageID;
	}
	@Override
	public void setMessageID(int messageID) {
		this.messageID = messageID;
	}

	@Override
	public String getUserName() {
		return userName;
	}
	@Override
	public void setUserName(String userName) {
		this.userName = userName;
	}

	@Override
	public Object getTarget() {
		return target;
	}
	@Override
	public void setTarget(Object target) {
		this.target = target;
	}

	@Override
	public Date getTimestamp() {
		return timestamp;
	}
	@Override
	public void setTimestamp(Date timestamp) {
		this.timestamp = timestamp;
	}

	@Override
	public String getMessage() {
		return message;
	}
	@Override
	public void setMessage(String message) {
		this.message = message;
	}

}
